{extend name="layout" /}
{block name="body"}    
  <div class="row">
    <div class="col-lg-12">
      <div class="card">
        <div class="card-body">
          
          <form action="{:url('add')}" method="post" name="add-form" class="row add-form">
            <div class="form-group col-md-12">
              <label for="type_id">手册分类</label>
              <div class="form-controls">
                <select class="form-control selectpicker" name="type_id" id="type_id">
                  {volist name="types" id="vo"}
                  <option value="{$vo.id}">{$vo.title_show|raw}</option>
                  {/volist}
                </select>
              </div>
            </div>
            <div class="form-group col-md-12">
              <label for="title">手册名称</label>
              <div class="form-controls">
                <input type="text" class="form-control" id="title" name="title" value="" placeholder="请输入手册名称" />
                <small class="form-text text-muted">(必填，120个字符以内!)</small>
              </div>
            </div>
            <div class="form-group col-md-12">
              <label for="author">作者</label>
              <div class="form-controls">
                <input type="text" class="form-control" id="author" name="author" value="" placeholder="请输入作者姓名" />
              </div>
            </div>
            <div class="form-group col-md-12">
              <label for="route_name">路由名称</label>
              <div class="form-controls">
                <input type="text" class="form-control" id="route_name" name="route_name" value="" placeholder="请输入路由名称" />
                <small class="form-text text-muted">(必填，20个字符以内，由英文字母、数字、下划线组合。)</small>
              </div>
            </div>
            <div class="form-group col-md-12">
              <label for="description">项目说明</label>
              <div class="form-controls">
                <textarea class="form-control" name="description" id="description" rows="3" placeholder="请输入项目说明"></textarea>
                <small class="help-block">(简要说明，255个字符以内)</small>
              </div>
            </div>
            {php}
            $form = ['title' => '手册封面', 'name' => 'cover', 'remark' => '必须'];
            {/php}
            {include file="../application/admin/view/form/image.html" type='' /}
            <div class="form-group col-md-12">
              <label>状态</label>
              <div class="form-controls clearfix">
                <div class="custom-control custom-radio custom-control-inline">
                  <input type="radio" id="statusOne" name="status" class="custom-control-input" value="0">
                  <label class="custom-control-label" for="statusOne">禁用</label>
                </div>
                <div class="custom-control custom-radio custom-control-inline">
                  <input type="radio" id="statusTwo" name="status" class="custom-control-input" value="1" checked>
                  <label class="custom-control-label" for="statusTwo">启用</label>
                </div>
              </div>
            </div>
            <div class="form-group col-md-12">
              <button type="submit" class="btn btn-primary m-r-5 ajax-post" target-form="add-form">确 定</button>
              <button type="button" class="btn btn-default" onclick="javascript:history.back(-1);return false;">返 回</button>
            </div>
          </form>
 
        </div>
      </div>
    </div>
    
  </div>
{/block}
{block name="otherjs"}
{include file="../application/admin/view/form/formjs.html" /}
{/block}